package com.changpay.zywy.adapter

import android.content.Context
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.changpay.zywy.R
import com.changpay.zywy.bean.*

/**
 * Created by chenxz on 2018/4/22.
 */
class MoneyInfoAdapter(private val context: Context?, datas: MutableList<HuoKuanBean.RefundAmountBean>) :
    BaseQuickAdapter<HuoKuanBean.RefundAmountBean, BaseViewHolder>(R.layout.item_money_info, datas) {

    override fun convert(helper: BaseViewHolder?, item: HuoKuanBean.RefundAmountBean?) {
        item ?: return
        helper ?: return
        helper.setText(R.id.tv_money,item.amount)
        if (item.isSelect)
        {
            helper.setBackgroundRes(R.id.iv_check,R.mipmap.icon_check)
        }else
        {
            helper.setBackgroundRes(R.id.iv_check,R.mipmap.icon_uncheck)
        }
    }

}
